feat: require backlog rows before new task spawns - #59
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Make filing a backlog row before dispatch a structural fail-closed mechanism in firstmate. A genuinely new ship or scout spawn must refuse before endpoint creation unless its ID is in the active home's In flight or Queued backlog, reading through the configured tasks-axi backend with an explicit HOME-scoped backlog file and falling back to manual section parsing when configured or unavailable. Secondmates, account recovery paths, and relaunches with existing metadata must remain exempt; batch dispatch must check each pair and continue after one refusal; the refusal must print the exact tasks-axi add repair command. Do not add a reasonless opt-out: permit only a small closed set of sanctioned exemption categories and record the chosen category in metadata. Resolve the AGENTS.md versus operating-fundamentals ordering contradiction so both say the row precedes endpoint creation. Add regression coverage for all of these paths. The existing fm-account-routing.test.sh session-sync race failure is a documented clean-main failure outside this change and must not be fixed or mistaken for a regression.
What Changed
Risk Assessment
✅ Low: The fix-round adds successful rowless coverage for resume, continuation, ordinary existing-metadata relaunch, and retains direct-account-recovery and secondmate coverage; the complete change now conforms to the stated intent without material source risks found.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
tests/fm-spawn-backlog.test.sh:265- Required regression coverage is incomplete: the intent requires account recovery paths and relaunches with existing metadata to remain exempt, but this suite explicitly verifies only direct-account recovery. Legacy--resume-account/--continue-accountand ordinary existing-metadata relaunches are not exercised without a backlog row; existing fixtures were instead given rows, so regressions in those exemptions could pass unnoticed. Add rowless cases for each exempt path.🔧 Fix: Cover rowless spawn exemption paths
✅ Re-checked - no issues remain.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"🔧 Fix: Classify failures as unrelated lifecycle environment issues
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.